import http from '@/utils/http'

// 查询登录日志列表
export function list (params) {
  return http({
    url: '/system/loginLog/list',
    method: 'post',
    data: http.adornData(params)
  })
}

// 删除登录日志
export function delLoginLog (ids) {
  return http({
    url: '/system/loginLog/delete/' + ids,
    method: 'post'
  })
}

// 解锁用户登录状态
export function unlockUser (username) {
  return http({
    url: '/system/loginLog/unlockUser/' + username,
    method: 'post'
  })
}

// 清空登录日志
export function cleanLoginLog () {
  return http({
    url: '/system/loginLog/clean',
    method: 'post'
  })
}

// 导出登录日志
export function exportLoginLog(query, filename) {
  return http.download('system/loginLog/export', { ...query }, filename)
}
